<% content_for(:favicon_path) { deploy_favicon_path(@deploy) } %>

<% page_title deploy_page_title %>

<%= breadcrumb @project, @deploy.stage, "Deploy ##{@deploy.id}" %>

<div id="header" class="stream-header">
  <%= render 'header' %>
</div>

<%= Samson::Hooks.render_views(:deploy_show_view, self, deploy: @deploy) %>

<ul id="deploy-tabs" class="nav nav-tabs" data-changeset-url="<%= changeset_project_deploy_url(@project, @deploy) %>">
  <li class="active"><a href="#output" data-toggle="tab">Output</a></li>
  <li><a href="#files" data-type="github" data-toggle="tab">Files</a></li>
  <li><a href="#commits" data-type="github" data-toggle="tab">Commits</a></li>
  <li><a href="#pull_requests" data-type="github" data-toggle="tab">Pull Requests</a></li>
  <li><a href="#risks" data-type="github" data-toggle="tab">Risks</a></li>
  <li><a href="#jira_issues" data-type="github" data-toggle="tab">JIRA Issues</a></li>
  <li><a href="#viewers" data-toggle="tab" id="viewers-link">Viewers <span class="badge">0</span></a></li>
  <%= Samson::Hooks.render_views(:deploy_tab_nav, self) %>
</ul>

<section class="clearfix tabs">
  <div class="tab-content deploy-details">
    <div class="tab-pane active" id="output" data-stream-url="<%= stream_path(@deploy.job) %>" data-desktop-notify="<%= current_user.desktop_notify? %>">
      <%= deploy_output %>
    </div>

    <%= render 'changeset/pane_placeholders' %>

    <div class="tab-pane" id="viewers">
      No other viewers.
    </div>

    <%= Samson::Hooks.render_views(:deploy_tab_body, self) %>
  </div>
</section>

<%= render 'shared/output_stream', job: @deploy.job %>
